import { httpGet, httpPost } from '@/utils/http'

/**
 * 获取游戏列表
 */
export const getGameListApi = () => {
  return httpPost('/shop/game/game_version')
}

/**
 * 获取游戏商品分类
 * @param game_id 游戏id
 * @param area_id 区服id
 */
export const getGoodsCategoryApi = (data) => {
  return httpPost('/shop/category/category', data)
}

/**
 * 获取商品列表
 * @param filters 筛选条件 {
 *  game_id: 游戏id
 *  area_id: 区服id
 *  category_id: 分类id
 *  is_available: 是否有货1是0否
 * }
 */
export const getGoodsListApi = (data) => {
  return httpPost('/shop/goods/get_list', data)
}

/**
 * 发送商品缺货请求 || 询价请求
 * @param spu
 * @param sku
 * @param email
 */
export const sendGoodsOrInquiryRequestApi = (url, data) => {
  return httpPost(url, data)
}
